﻿<phone:PhoneApplicationPage
    x:Class="BlogApp.WP8.View.PostDetailPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="True"
    DataContext="{Binding PostViewModel, Source={StaticResource Locator}}">

    <phone:PhoneApplicationPage.FontFamily>
        <StaticResource ResourceKey="PhoneFontFamilyNormal"/>
    </phone:PhoneApplicationPage.FontFamily>
    <phone:PhoneApplicationPage.FontSize>
        <StaticResource ResourceKey="PhoneFontSizeNormal"/>
    </phone:PhoneApplicationPage.FontSize>
    <phone:PhoneApplicationPage.Foreground>
        <StaticResource ResourceKey="PhoneForegroundBrush"/>
    </phone:PhoneApplicationPage.Foreground>
    <phone:PhoneApplicationPage.Background>
        <StaticResource ResourceKey="BackgroundBrush"/>
    </phone:PhoneApplicationPage.Background>

    <shell:SystemTray.ProgressIndicator>
        <shell:ProgressIndicator IsIndeterminate="{Binding IsLoading}" 
                                 IsVisible="{Binding IsLoading}" />
    </shell:SystemTray.ProgressIndicator>


    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" ForegroundColor="{StaticResource AppBarForegroundColor}" BackgroundColor="{StaticResource AccentColor}"  Mode="Minimized">
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="[comment]" x:Name="AppBarMenuItemComment" Click="AppBarMenuItemComment_Click"> </shell:ApplicationBarMenuItem>
                <shell:ApplicationBarMenuItem Text="[open in browser]" x:Name="AppBarMenuItemOpenInBrowser" Click="openInBrowserMenuItem_Click"/>
                <shell:ApplicationBarMenuItem Text="[offline]" x:Name="AppBarMenuItemSaveOffline" Click="saveOfflineMenuItem_Click"/>
                <shell:ApplicationBarMenuItem Text="[share]" x:Name="AppBarMenuItemShareLink" Click="shareLinkMenuItem_Click"/>
                <shell:ApplicationBarMenuItem Text="[share]" x:Name="AppBarMenuItemSendLink" Click="sendLinkMenuItem_Click"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid x:Name="ContentPanel" Background="{StaticResource BackgroundBrush}">
            <phone:WebBrowser x:Name="webBrowser" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="-5,-10,-5,-5" Foreground="{StaticResource BackgroundBrush}" />
        </Grid>
    </Grid>

</phone:PhoneApplicationPage>